/**
 *
 */
package com.ssyt.examinationsystem.dao.impl;

import com.jdbc.util.JdbcUtils;
import com.ssyt.examinationsystem.dao.IExamDAO;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
public class ExamDAOImpl implements IExamDAO {
    @Override
    public List<Map<String, Object>> getAnswersByIds(String ids, String tableName, String id) {
        String sql = "select answer from " + tableName + " where " + id + " in (" + ids + ") order by field(" + id + ","
                + ids + ")";
        List<Map<String, Object>> list = JdbcUtils.executeQuery(sql);

        return list;
    }

}
